class UrlMappings {
    static mappings = {
        "/$controller/$action?/$id?" {
            constraints {
                // apply constraints here
            }
        }
        "500"(view: '/error')

        "/"(controller: 'main', action: 'index')

        "/$controller/_ajaxvalidate"(controller: 'remoteValidate', action: 'index')
    }
}
